Learn R Programming

Compositional (version 1.5)

Dirichlet regression: Dirichlet regression

Description

Dirichlet regression.

Usage

diri.reg(y, x, plot = TRUE, xnew = NULL)
diri.reg2(y, x, xnew = NULL)

Arguments

y
A matrix with the compositional data (dependent variable). Zero values are not allowed.
x
The predictor variable(s), they can be either continnuous or categorical or both.
plot
A boolean variable specifying whether to plot the leverage values of the observations or not. This is taken into account only when xnew = NULL.
xnew
If you have new data use it, otherwise leave it NULL.

Value

A list including:
runtime
The time required by the regression.
loglik
The value of the log-likelihood.
phi
The precision parameter. If covariates are linked with it (function "diri.reg2"), this will be a vector.
phipar
The coefficients of the phi parameter if it is linked to the covariates.
std.phi
The standard errors of the coefficients of the phi parameter is it linked to the covariates.
log.phi
The logarithm of the precision parameter.
std.logphi
The standard error of the logarithm of the precision parameter.
beta
The beta coefficients.
seb
The standard error of the beta coefficients.
sigma
Th covariance matrix of the regression parameters (for the mean vector and the phi parameter) in the function "diri.reg2".
lev
The leverage values.
est
The fitted or the predicted values (if xnew is not NULL).

Details

A Dirichlet distribution is assumed for the regression. This involves numerical optimisation. The function "diri.reg2" allows for the covariates to be linked with the precisio parameter $\phi$ via the exponential link function $\phi = e^{x*b}$.

References

Maier, Marco J. (2014) DirichletReg: Dirichlet Regression for Compositional Data in R. Research Report Series/Department of Statistics and Mathematics, 125. WU Vienna University of Economics and Business, Vienna. http://epub.wu.ac.at/4077/1/Report125.pdf

Gueorguieva, Ralitza, Robert Rosenheck, and Daniel Zelterman (2008). Dirichlet component regression and its applications to psychiatric data. Computational statistics & data analysis 52(12): 5344-5355.

See Also

js.compreg, kl.compreg, ols.compreg, comp.reg, alfa.reg

Examples

Run this code
x <- iris[, 4]
y <- iris[, 1:3]
mod1 <- diri.reg(y, x)
mod2 <-diri.reg2(y, x)
mod3 <- comp.reg(y, x)

Run the code above in your browser using DataLab